package com.hx.product.domain;

import com.hx.common.annotation.Excel;
import com.hx.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品对象 pro_goods
 *
 * @author Chicken Brother Team
 * @date 2023-05-25
 */
public class Goods extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    private Integer id;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String name;

    /**
     * 商品描述
     */
    @Excel(name = "商品描述")
    private String description;

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /**
     * 商品库存
     */
    @Excel(name = "商品库存")
    private Integer stock;

    /**
     * 商品分类ID
     */
    @Excel(name = "商品分类ID")
    private Integer categoryId;

    /**
     * 商品品牌ID
     */
    @Excel(name = "商品品牌ID")
    private Integer brandId;

    /**
     * 商品状态（0：下架，1：上架）
     */
    @Excel(name = "商品状态", readConverterExp = "0=：下架，1：上架")
    private Integer status;

    /**
     * 商品属性与属性值关联信息
     */
    private List<AttrValue> attrValueList;
    /**
     * 商品图片关联信息
     */
    private List<Images> imageList;
    private List<Comment> comments;

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public List<Images> getImageList() {
        return imageList;
    }

    public void setImageList(List<Images> imageList) {
        this.imageList = imageList;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getStock() {
        return stock;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    public Integer getBrandId() {
        return brandId;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public List<AttrValue> getAttrValueList() {
        return attrValueList;
    }

    public void setAttrValueList(List<AttrValue> attrValueList) {
        this.attrValueList = attrValueList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("description", getDescription())
                .append("price", getPrice())
                .append("stock", getStock())
                .append("categoryId", getCategoryId())
                .append("brandId", getBrandId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("status", getStatus())
                .append("attrValueList", getAttrValueList())
                .append("imagesList", getImageList())
                .append("commentList", getComments())
                .toString();
    }
}
